package cn.amarone.scaffold.entity;

import cn.amarone.scaffold.entity.dict.StatusEnum;
import com.mybatisflex.annotation.*;
import com.mybatisflex.core.keygen.KeyGenerators;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import lombok.experimental.Accessors;

import java.util.Date;
import java.util.List;

/**
 * @author Amarone
 * @version 1.0
 * @description: 角色信息表
 * @date 2023/8/2 14:33
 */
@Getter
@Setter
@Accessors(chain = true)
@AllArgsConstructor
@NoArgsConstructor
@Builder
@Table(value = "sys_role", camelToUnderline = true)
@Schema(title = "角色信息")
public class SysRole {

    @Id(keyType = KeyType.Auto, value = KeyGenerators.snowFlakeId)
    @Schema(description = "角色ID", example = "43536994589908992")
    private Long id;

    @Schema(description = "角色名称", example = "特殊角色")
    private String roleName;

    @Schema(description = "备注", example = "特殊角色")
    private String remark;

    @Schema(description = "启用标志")
    private StatusEnum status;

    @Column(tenantId = true)
    private Long orgId;

    @Schema(description = "创建日期")
    @Column(onInsertValue = "now()")
    private Date createTime;
    @Schema(description = "创建者")
    private Long createBy;
    @Schema(description = "修改日期")
    @Column(onUpdateValue = "now()")
    private Date updateTime;
    @Schema(description = "修改者")
    private Long updateBy;
    @Schema(description = "删除标记")
    @Column(isLogicDelete = true)
    private Integer deleteFlag;
}
